package com.wh1200.mybatis.xmlless.model


/**
 *
 * @author 吴昊
 * @date 2024/1/16 19:36
 * @since v0.0.0
 * @version 1.0
 */
data class SortInfo(
    val value: String,
    val isAsc: Boolean,
    val mode: Mode = Mode.Property
) {

  /** 排序方向 */
  val direction = if (isAsc) {
    "ASC"
  } else {
    "DESC"
  }

  enum class Mode {
    Property, Expression
  }
}
